package pl.kosmowska.ewelina.client.views.widgets.popup;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.*;


public class PopupMessage extends DialogBox {

	 private final FlowPanel container = new FlowPanel();

	    public PopupMessage(String message)
	    {        
	        final Image ajaxImage = new Image("images/wait.gif");
	        final Grid grid = new Grid(1, 2);  
	      //  grid.setWidget(0, 0, ajaxImage);
	        grid.setText(0, 1, message);
	        this.container.add(grid);
	        add(this.container);       
	    }

	    @Override
	    public Widget asWidget()
	    {
	        return this;
	    }


	    public void stopProcessing()
	    {
	        hide();
	    }


	    public void startProcessing()
	    {
	        center();
	        show();
	    }


	    public void showWidget()
	    {
	        startProcessing();
	    }

}